/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package basics.classes;

/**
 *
 * @author peng
 */
public class Circle {
    
    //Declares field variable for the radius of a Circle.
    private int radius;
    
    //Declares a constant value for PI.
    private final double PI=3.14;
    
    //Constructor which is used to create a circle.
    public Circle(int r)
    {
        radius=r;
    }
    
    //Get the radius of the circle.
    public int getRadius()
    {
        return radius;
    }
    
    //Set a value to the radius.
    public void setRadius(int r)
    {
        radius=r;
    }
    
    //Calculating the Circumference of the circle.
    public double getCircumference()
    {
        return 2*radius*PI;
    }
    
    //Calculating the area of the circle.
    public double getArea()
    {
        return radius*radius*PI;
    }
    
}
